1. Technical Field
This disclosure relates generally to code synchronization in a data processing system and more specifically to efficient identification of code synchronization points in a managed runtime environment of the data processing system.
2. Description of the Related Art
Applications running on a Java® virtual machine (JVM) use locking mechanisms in the form of object locks or java.util.Concurrent locks to manage synchronization between threads. Synchronization however can cause performance issues and prevent applications from scaling when moved to or operated on larger multi-core processing systems. Techniques exist to help developers identify which locks are highly contended, referred to as hot, however the techniques typically have drawbacks.
Drawbacks typically comprise a lack of information as to where in application code the particular locks are held. Further overhead of capturing call path information affects behavior of the application to an unacceptable degree. In gathering information the techniques sample call paths related to all locks regardless of whether the locks a viewed as being hot and therefore typically capture less information about locks, which matter. Sampling further is performed for all threads/call paths because the techniques have no knowledge of which threads/call paths might include locking.
For example, synchronizing on an object with a unique class as opposed to a java.lang.Object can help improve the data collected by these existing techniques. However, this form of synchronizing requires an application to be designed in a particular manner and will not provide information about which code paths are highly contending on a specific lock. For example, there may be 10 locations at which the lock may be held, but only 2 of those locations are called frequently.